﻿<%@ Control Language="C#"  %>
<script runat="server">
    private ArrayList shopping_cart_list;
    private int Item_Lang;
    protected void Page_Load(object sender, EventArgs e)
    {
        Item_Lang = Utils.GetQueryString("lang", 1);
        string shopping_cart_list_str = "";
        if (Shopping_Cart_List!=null)
        for(int i=0;i<Shopping_Cart_List.Count;i++)
        {
            if(i==0)
            shopping_cart_list_str = Shopping_Cart_List[i].ToString();
            shopping_cart_list_str = shopping_cart_list_str+"," + Shopping_Cart_List[i].ToString();
            
        }
        
        Product pro = new Product();
        Repeater_List.DataSource = pro.List_Shopping_cart(shopping_cart_list_str);
        Repeater_List.DataBind();
    }
    public ArrayList Shopping_Cart_List
    {
        get { return shopping_cart_list; }
        set { shopping_cart_list = value; }
    }
</script>
<table>
    <thead>
    <tr class="head">
        <td></td>
        <td><%=Lang.Show("Name") %></td>
        <td><%=Lang.Show("Columns") %></td>
        <td><%=Lang.Show("Item_Price") %></td>
        <td><%=Lang.Show("Count") %></td>
        <td><%=Lang.Show("Del") %></td>
        <td><%=Lang.Show("View") %></td>
    </tr>
    </thead>
    <tbody>
<asp:Repeater runat="server" ID="Repeater_List">
<ItemTemplate>
    <tr id="tr<%#Eval("Item_Id") %>">
        <td><img alt="<%#Eval("Item_Name") %>" src="../DataFile/Product/<%#Eval("Create_Time","{0:yyyyMM}") %>/<%#Eval("Create_Time","{0:ddHHmmss}") %>_ssss.jpg" /></td>
        <td><%#Eval("Item_Name") %></td>
        <td><%#Eval("Name") %></td>
        <td class="price">￥<code><%#Eval("Item_Price") %></code></td>
        <td><select><%for(int s=1;s<=20;s++){ %><option value="<%=s %>"><%=s %></option><%} %></select></td>
        <td><a href="JavaScript:Del_Shopping_List_Item(<%#Eval("Item_Id") %>)"><%=Lang.Show("Del") %></a></td>
        <td><a target="_blank" href="Product.View.aspx?id=<%#Eval("Item_Id") %>&lang=<%=Item_Lang %>"><%=Lang.Show("View") %></a></td>
    </tr></ItemTemplate>
</asp:Repeater>
        </tbody>
    <tfoot>
    <tr class="footer">
        <td></td>
        <td></td>
        <td></td>
        <td class="price">￥<code id="Price"></code></td>
        <td><code id="Count"></code></td>
        <td></td>
        <td></td>
    </tr>
        </tfoot>
</table>

<script type="text/javascript">
    Price();
    Price_Change();
</script>
